package c.a.a.d0;

import android.graphics.Color;
import c.a.a.d0.h0.c;
import c.a.a.d0.h0.c.b;
import java.io.IOException;

/* compiled from: ColorParser */
public class e implements g0<Integer> {
    public static final e a = new e();

    public Object a(c cVar, float f) throws IOException {
        Object obj = cVar.u0() == b.BEGIN_ARRAY ? 1 : null;
        if (obj != null) {
            cVar.n();
        }
        double w = cVar.w();
        double w2 = cVar.w();
        double w3 = cVar.w();
        double w4 = cVar.u0() == b.NUMBER ? cVar.w() : 1.0d;
        if (obj != null) {
            cVar.q();
        }
        if (w <= 1.0d && w2 <= 1.0d && w3 <= 1.0d) {
            w *= 255.0d;
            w2 *= 255.0d;
            w3 *= 255.0d;
            if (w4 <= 1.0d) {
                w4 *= 255.0d;
            }
        }
        return Integer.valueOf(Color.argb((int) w4, (int) w, (int) w2, (int) w3));
    }
}
